package JDBC;

import java.sql.*;

import DaoMYSQL.MYSQLGebruiker;
import appinterface.Igebruiker;

public class Connection extends DaoFactory{
	
	private String url = "jdbc:mysql://localhost/kasboek";
	private String user = "root";
	private String pass  = "Vera123";
	
	java.sql.Connection conn;

	public void openConn(){
		
			try {
				Class.forName("com.mysql.jdbc.Driver").newInstance();
				conn = DriverManager.getConnection(url, user, pass);
				System.out.println("Connected!");
				
			} catch (Exception e) {
				// TODO Auto-generated catch block
				System.out.println(e.getMessage());
			}
	
	}

	public Igebruiker getIgebruiker() {
		return MYSQLGebruiker.getinstance();
	}
}
